home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / bioz2.lha / BioZ_II / BioZReq.c < prev    next >
C/C++ Source or Header  |  1980-01-01  |  14KB  |  487 lines

  1. struct TextAttr Font=
  2. {
  3.     "topaz.font",8,FS_NORMAL,FPF_ROMFONT
  4. };
  5.  
  6. struct NewScreen NewScreen=
  7. {
  8.     0,0,640,256,3,
  9.     2,1,
  10.     HIRES,CUSTOMSCREEN,&Font,
  11.     NULL,
  12.     NULL,NULL
  13. };
  14.     
  15.  
  16. struct NewWindow NewWindow =
  17. {
  18.     0,12,640,244,1,0,
  19.     CLOSEWINDOW|RAWKEY|MOUSEBUTTONS|GADGETUP|REQSET,
  20.     WINDOWDRAG|WINDOWCLOSE|WINDOWDEPTH|ACTIVATE,
  21.     NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
  22.     CUSTOMSCREEN
  23. };
  24.  
  25.  
  26. UBYTE UNDOBUFFER2[9],UNDOBUFFER3[24];
  27.  
  28. SHORT BorderVectors1[] = {
  29.     0,0,
  30.     54,0,
  31.     54,14,
  32.     0,14,
  33.     0,0
  34. };
  35. struct Border Border1 = {
  36.     -1,-1,    /* XY origin relative to container TopLeft */
  37.     3,0,JAM1,    /* front pen, back pen and drawmode */
  38.     5,    /* number of XY vectors */
  39.     BorderVectors1,    /* pointer to XY vectors */
  40.     NULL    /* next border in list */
  41. };
  42.  
  43. struct IntuiText IText1 = {
  44.     2,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  45.     20,3,    /* XY origin relative to container TopLeft */
  46.     &Font,    /* font pointer or NULL for default */
  47.     "OK",    /* pointer to text */
  48.     NULL    /* next IntuiText structure */
  49. };
  50.  
  51. struct Gadget Gadget7 = {
  52.     NULL,    /* next gadget */
  53.     254,66,    /* origin XY of hit box relative to window TopLeft */
  54.     53,13,    /* hit box width and height */
  55.     NULL,    /* gadget flags */
  56.     RELVERIFY|ENDGADGET,    /* activation flags */
  57.     BOOLGADGET|REQGADGET,    /* gadget type flags */
  58.     (APTR)&Border1,    /* gadget border or image to be rendered */
  59.     NULL,    /* alternate imagery for selection */
  60.     &IText1,    /* first IntuiText structure */
  61.     NULL,    /* gadget mutual-exclude long word */
  62.     NULL,    /* SpecialInfo structure */
  63.     NULL,    /* user-definable data */
  64.     NULL    /* pointer to user-definable data */
  65. };
  66.  
  67. SHORT BorderVectors2[] = {
  68.     0,0,
  69.     13,0,
  70.     13,10,
  71.     0,10,
  72.     0,0
  73. };
  74. struct Border Border2 = {
  75.     -1,-1,    /* XY origin relative to container TopLeft */
  76.     3,0,JAM1,    /* front pen, back pen and drawmode */
  77.     5,    /* number of XY vectors */
  78.     BorderVectors2,    /* pointer to XY vectors */
  79.     NULL    /* next border in list */
  80. };
  81.  
  82.  
  83.  
  84. struct IntuiText IText2 = {
  85.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  86.     2,1,    /* XY origin relative to container TopLeft */
  87.     &Font,    /* font pointer or NULL for default */
  88.     "<",    /* pointer to text */
  89.     NULL    /* next IntuiText structure */
  90. };
  91.  
  92. struct Gadget Gadget6 = {
  93.     &Gadget7,    /* next gadget */
  94.     145,68,    /* origin XY of hit box relative to window TopLeft */
  95.     12,9,    /* hit box width and height */
  96.     GADGDISABLED,    /* gadget flags */
  97.     RELVERIFY,    /* activation flags */
  98.     BOOLGADGET|REQGADGET,    /* gadget type flags */
  99.     (APTR)&Border2,    /* gadget border or image to be rendered */
  100.     NULL,    /* alternate imagery for selection */
  101.     &IText2,    /* first IntuiText structure */
  102.     NULL,    /* gadget mutual-exclude long word */
  103.     NULL,    /* SpecialInfo structure */
  104.     NULL,    /* user-definable data */
  105.     NULL    /* pointer to user-definable data */
  106. };
  107.  
  108. SHORT BorderVectors3[] = {
  109.     0,0,
  110.     13,0,
  111.     13,10,
  112.     0,10,
  113.     0,0
  114. };
  115. struct Border Border3 = {
  116.     -1,-1,    /* XY origin relative to container TopLeft */
  117.     3,0,JAM1,    /* front pen, back pen and drawmode */
  118.     5,    /* number of XY vectors */
  119.     BorderVectors3,    /* pointer to XY vectors */
  120.     NULL    /* next border in list */
  121. };
  122.  
  123. struct IntuiText IText3 = {
  124.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  125.     2,1,    /* XY origin relative to container TopLeft */
  126.     &Font,    /* font pointer or NULL for default */
  127.     ">",    /* pointer to text */
  128.     NULL    /* next IntuiText structure */
  129. };
  130.  
  131. struct Gadget Gadget5 = {
  132.     &Gadget6,    /* next gadget */
  133.     211,68,    /* origin XY of hit box relative to window TopLeft */
  134.     12,9,    /* hit box width and height */
  135.     GADGDISABLED,    /* gadget flags */
  136.     RELVERIFY,    /* activation flags */
  137.     BOOLGADGET|REQGADGET,    /* gadget type flags */
  138.     (APTR)&Border3,    /* gadget border or image to be rendered */
  139.     NULL,    /* alternate imagery for selection */
  140.     &IText3,    /* first IntuiText structure */
  141.     NULL,    /* gadget mutual-exclude long word */
  142.     NULL,    /* SpecialInfo structure */
  143.     NULL,    /* user-definable data */
  144.     NULL    /* pointer to user-definable data */
  145. };
  146.  
  147. struct StringInfo Gadget4SInfo = {
  148.     NULL,    /* buffer where text will be edited */
  149.     NULL,    /* optional undo buffer */
  150.     0,    /* character position in buffer */
  151.     9,    /* maximum number of characters to allow */
  152.     0,    /* first displayed character buffer position */
  153.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  154.     0,    /* Rastport of gadget */
  155.     0,    /* initial value for integer gadgets */
  156.     NULL    /* alternate keymap (fill in if you set the flag) */
  157. };
  158.  
  159. SHORT BorderVectors4[] = {
  160.     0,0,
  161.     107,0,
  162.     107,9,
  163.     0,9,
  164.     0,0
  165. };
  166. struct Border Border4 = {
  167.     -1,-1,    /* XY origin relative to container TopLeft */
  168.     3,0,JAM1,    /* front pen, back pen and drawmode */
  169.     5,    /* number of XY vectors */
  170.     BorderVectors4,    /* pointer to XY vectors */
  171.     NULL    /* next border in list */
  172. };
  173.  
  174. struct Gadget Gadget4 = {
  175.     &Gadget5,    /* next gadget */
  176.     201,34,    /* origin XY of hit box relative to window TopLeft */
  177.     106,8,    /* hit box width and height */
  178.     NULL,    /* gadget flags */
  179.     RELVERIFY|STRINGCENTER,    /* activation flags */
  180.     STRGADGET|REQGADGET,    /* gadget type flags */
  181.     (APTR)&Border4,    /* gadget border or image to be rendered */
  182.     NULL,    /* alternate imagery for selection */
  183.     NULL,    /* first IntuiText structure */
  184.     NULL,    /* gadget mutual-exclude long word */
  185.     (APTR)&Gadget4SInfo,    /* SpecialInfo structure */
  186.     NULL,    /* user-definable data */
  187.     NULL    /* pointer to user-definable data */
  188. };
  189.  
  190. UBYTE Gadget3SIBuff[9];
  191. struct StringInfo Gadget3SInfo = {
  192.     Gadget3SIBuff,    /* buffer where text will be edited */
  193.     UNDOBUFFER2,    /* optional undo buffer */
  194.     0,    /* character position in buffer */
  195.     9,    /* maximum number of characters to allow */
  196.     0,    /* first displayed character buffer position */
  197.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  198.     0,    /* Rastport of gadget */
  199.     0,    /* initial value for integer gadgets */
  200.     NULL    /* alternate keymap (fill in if you set the flag) */
  201. };
  202.  
  203. SHORT BorderVectors5[] = {
  204.     0,0,
  205.     107,0,
  206.     107,9,
  207.     0,9,
  208.     0,0
  209. };
  210. struct Border Border5 = {
  211.     -1,-1,    /* XY origin relative to container TopLeft */
  212.     3,0,JAM1,    /* front pen, back pen and drawmode */
  213.     5,    /* number of XY vectors */
  214.     BorderVectors5,    /* pointer to XY vectors */
  215.     NULL    /* next border in list */
  216. };
  217.  
  218. struct Gadget Gadget3 = {
  219.     &Gadget4,    /* next gadget */
  220.     201,50,    /* origin XY of hit box relative to window TopLeft */
  221.     106,8,    /* hit box width and height */
  222.     NULL,    /* gadget flags */
  223.     RELVERIFY|STRINGCENTER,    /* activation flags */
  224.     STRGADGET|REQGADGET,    /* gadget type flags */
  225.     (APTR)&Border5,    /* gadget border or image to be rendered */
  226.     NULL,    /* alternate imagery for selection */
  227.     NULL,    /* first IntuiText structure */
  228.     NULL,    /* gadget mutual-exclude long word */
  229.     (APTR)&Gadget3SInfo,    /* SpecialInfo structure */
  230.     NULL,    /* user-definable data */
  231.     NULL    /* pointer to user-definable data */
  232. };
  233.  
  234. UBYTE Gadget2SIBuff[24];
  235. struct StringInfo Gadget2SInfo = {
  236.     Gadget2SIBuff,    /* buffer where text will be edited */
  237.     UNDOBUFFER3,    /* optional undo buffer */
  238.     0,    /* character position in buffer */
  239.     24,    /* maximum number of characters to allow */
  240.     0,    /* first displayed character buffer position */
  241.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  242.     0,    /* Rastport of gadget */
  243.     0,    /* initial value for integer gadgets */
  244.     NULL    /* alternate keymap (fill in if you set the flag) */
  245. };
  246.  
  247. SHORT BorderVectors6[] = {
  248.     0,0,
  249.     161,0,
  250.     161,9,
  251.     0,9,
  252.     0,0
  253. };
  254. struct Border Border6 = {
  255.     -1,-1,    /* XY origin relative to container TopLeft */
  256.     3,0,JAM1,    /* front pen, back pen and drawmode */
  257.     5,    /* number of XY vectors */
  258.     BorderVectors6,    /* pointer to XY vectors */
  259.     NULL    /* next border in list */
  260. };
  261.  
  262. struct Gadget Gadget2 = {
  263.     &Gadget3,    /* next gadget */
  264.     148,18,    /* origin XY of hit box relative to window TopLeft */
  265.     160,8,    /* hit box width and height */
  266.     NULL,    /* gadget flags */
  267.     RELVERIFY,    /* activation flags */
  268.     STRGADGET|REQGADGET,    /* gadget type flags */
  269.     (APTR)&Border6,    /* gadget border or image to be rendered */
  270.     NULL,    /* alternate imagery for selection */
  271.     NULL,    /* first IntuiText structure */
  272.     NULL,    /* gadget mutual-exclude long word */
  273.     (APTR)&Gadget2SInfo,    /* SpecialInfo structure */
  274.     NULL,    /* user-definable data */
  275.     NULL    /* pointer to user-definable data */
  276. };
  277.  
  278. SHORT BorderVectors7[] = {
  279.     0,0,
  280.     91,0,
  281.     91,14,
  282.     0,14,
  283.     0,0
  284. };
  285. struct Border Border7 = {
  286.     -1,-1,    /* XY origin relative to container TopLeft */
  287.     3,0,JAM1,    /* front pen, back pen and drawmode */
  288.     5,    /* number of XY vectors */
  289.     BorderVectors7,    /* pointer to XY vectors */
  290.     NULL    /* next border in list */
  291. };
  292.  
  293. struct IntuiText IText4 = {
  294.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  295.     16,3,    /* XY origin relative to container TopLeft */
  296.     &Font,    /* font pointer or NULL for default */
  297.     NULL,    /* pointer to text */
  298.     NULL    /* next IntuiText structure */
  299. };
  300.  
  301. struct Gadget Gadget1 = {
  302.     &Gadget2,    /* next gadget */
  303.     21,66,    /* origin XY of hit box relative to window TopLeft */
  304.     90,13,    /* hit box width and height */
  305.     GADGDISABLED,    /* gadget flags */
  306.     RELVERIFY|ENDGADGET,    /* activation flags */
  307.     BOOLGADGET|REQGADGET,    /* gadget type flags */
  308.     (APTR)&Border7,    /* gadget border or image to be rendered */
  309.     NULL,    /* alternate imagery for selection */
  310.     &IText4,    /* first IntuiText structure */
  311.     NULL,    /* gadget mutual-exclude long word */
  312.     NULL,    /* SpecialInfo structure */
  313.     NULL,    /* user-definable data */
  314.     NULL    /* pointer to user-definable data */
  315. };
  316.  
  317. #define GadgetList1 Gadget1
  318.  
  319. struct IntuiText IText8 = {
  320.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  321.     169,69,    /* XY origin relative to container TopLeft */
  322.     &Font,    /* font pointer or NULL for default */
  323.     NULL,    /* pointer to text */
  324.     NULL    /* next IntuiText structure */
  325. };
  326.  
  327. struct IntuiText IText7 = {
  328.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  329.     19,50,    /* XY origin relative to container TopLeft */
  330.     &Font,    /* font pointer or NULL for default */
  331.     NULL,    /* pointer to text */
  332.     &IText8    /* next IntuiText structure */
  333. };
  334.  
  335. struct IntuiText IText6 = {
  336.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  337.     19,34,    /* XY origin relative to container TopLeft */
  338.     &Font,    /* font pointer or NULL for default */
  339.     NULL,    /* pointer to text */
  340.     &IText7    /* next IntuiText structure */
  341. };
  342.  
  343. struct IntuiText IText5 = {
  344.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  345.     19,18,    /* XY origin relative to container TopLeft */
  346.     &Font,    /* font pointer or NULL for default */
  347.     NULL,    /* pointer to text */
  348.     &IText6    /* next IntuiText structure */
  349. };
  350.  
  351. #define IntuiTextList1 IText5
  352.  
  353. SHORT BorderVectors8[] = {
  354.     0,0,
  355.     326,0,
  356.     326,96,
  357.     0,96,
  358.     0,0
  359. };
  360. struct Border Border8 = {
  361.     0,0,    /* XY origin relative to container TopLeft */
  362.     1,0,JAM1,    /* front pen, back pen and drawmode */
  363.     5,    /* number of XY vectors */
  364.     BorderVectors8,    /* pointer to XY vectors */
  365.     NULL    /* next border in list */
  366. };
  367.  
  368. struct Requester MyReq = {
  369.     NULL,    /* previous requester (filled in by Intuition) */
  370.     157,66,    /* requester XY origin relative to TopLeft of window */
  371.     327,97,    /* requester width and height */
  372.     0,0,    /* relative to these mouse offsets if POINTREL is set */
  373.     &GadgetList1,    /* gadget list */
  374.     &Border8,    /* box's border */
  375.     &IntuiTextList1,    /* requester text */
  376.     NULL,    /* requester flags */
  377.     0,    /* back-plane fill pen */
  378.     NULL,    /* leave these alone */
  379.     NULL,    /* custom bitmap if PREDRAWN is set */
  380.     NULL    /* leave this alone */
  381. };
  382.  
  383. struct IntuiText OK=
  384. {
  385.   0,       /* FrontPen, colour 0 (blue). */
  386.   0,       /* BackPen, not used since JAM1. */
  387.   JAM1,    /* DrawMode, do not change the background. */
  388.   6,       /* LedtEdge, 6 pixels out. */
  389.   3,       /* TopEdge, 3 lines down. */
  390.   &Font,    /* ITextFont, default font. */
  391.   "OK",    /* IText, the text that will be printed. */
  392.   NULL,    /* NextText, no more IntuiText structures link. */
  393. };
  394.  
  395. struct IntuiText BAD=
  396. {
  397.   0,       /* FrontPen, colour 0 (blue). */
  398.   0,       /* BackPen, not used since JAM1. */
  399.   JAM1,    /* DrawMode, do not change the background. */
  400.   15,      /* LedtEdge, 15 pixels out. */
  401.   5,       /* TopEdge, 5 lines down. */
  402.   &Font,    /* ITextFont, default font. */
  403.   NULL, /* IText, the text . */
  404.   NULL,    /* NextText, no more IntuiText structures link. */
  405. };
  406.  
  407. /* end of PowerWindows source generation */
  408.  
  409. SHORT BorderVectors10[] = {
  410.     0,0,
  411.     58,0,
  412.     58,15,
  413.     0,15,
  414.     0,0
  415. };
  416.  
  417. SHORT BorderVectors11[] = {
  418.     0,0,
  419.     250,0,
  420.     250,49,
  421.     0,49,
  422.     0,0
  423. };
  424.  
  425. struct Border Border10 = {
  426.     -1,-1,    /* XY origin relative to container TopLeft */
  427.     3,0,JAM1,    /* front pen, back pen and drawmode */
  428.     5,    /* number of XY vectors */
  429.     BorderVectors10,    /* pointer to XY vectors */
  430.     NULL    /* next border in list */
  431. };
  432.  
  433. struct Border Border11 = {
  434.     0,0,    /* XY origin relative to container TopLeft */
  435.     1,0,JAM1,    /* front pen, back pen and drawmode */
  436.     5,    /* number of XY vectors */
  437.     BorderVectors11,    /* pointer to XY vectors */
  438.     NULL    /* next border in list */
  439. };
  440.  
  441. struct IntuiText IText10 = {
  442.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  443.     14,3,    /* XY origin relative to container TopLeft */
  444.     &Font,    /* font pointer or NULL for default */
  445.     "STOP",    /* pointer to text */
  446.     NULL    /* next IntuiText structure */
  447. };
  448.  
  449. struct Gadget Gadget10 = {
  450.     NULL,    /* next gadget */
  451.     99,26,    /* origin XY of hit box relative to window TopLeft */
  452.     57,14,    /* hit box width and height */
  453.     NULL,    /* gadget flags */
  454.     RELVERIFY|ENDGADGET,    /* activation flags */
  455.     BOOLGADGET|REQGADGET,    /* gadget type flags */
  456.     (APTR)&Border10,    /* gadget border or image to be rendered */
  457.     NULL,    /* alternate imagery for selection */
  458.     &IText10,    /* first IntuiText structure */
  459.     NULL,    /* gadget mutual-exclude long word */
  460.     NULL,    /* SpecialInfo structure */
  461.     NULL,    /* user-definable data */
  462.     NULL    /* pointer to user-definable data */
  463. };
  464.  
  465. struct IntuiText IText20 = {
  466.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  467.     42,11,    /* XY origin relative to container TopLeft */
  468.     &Font,    /* font pointer or NULL for default */
  469.     NULL,    /* pointer to text */
  470.     NULL    /* next IntuiText structure */
  471. };
  472.  
  473. struct Requester MyReq2 = {
  474.     NULL,    /* previous requester (filled in by Intuition) */
  475.     195,74,    /* requester XY origin relative to TopLeft of window */
  476.     251,50,    /* requester width and height */
  477.     0,0,    /* relative to these mouse offsets if POINTREL is set */
  478.     &Gadget10,    /* gadget list */
  479.     &Border11,    /* box's border */
  480.     &IText20,    /* requester text */
  481.     NULL,    /* requester flags */
  482.     0,    /* back-plane fill pen */
  483.     NULL,    /* leave these alone */
  484.     NULL,    /* custom bitmap if PREDRAWN is set */
  485.     NULL    /* leave this alone */
  486. };
  487.